/**
 * 
 */
package com.sss.hloster0307;

/**
 * @author 茶楼
 *
 */
public class Rectangle extends Shape {// 矩形类
	private int Width;// 长度
	private int height;// 宽度

	public Rectangle() {
		super();
	}

	public Rectangle(int width, int height, char color) {
		super(color);
		this.Width = width;
		this.height = height;
	}

	public void getArea() {
		System.out.println("该矩形面积为：" + Width * height);
	}

	public void getPer() {
		System.out.println("该矩形周长为：" + (Width + height)*2);
	}

	public void showAll() {
		System.out.println("该矩形颜色为：" + this.getColor());
		getArea();
		getPer();
	}

	public int getWidth() {
		return Width;
	}

	public void setWidth(int width) {
		Width = width;
	}

	public int getHeight() {
		return height;
	}

	public void setHeight(int height) {
		this.height = height;
	}

}
